<template>
  <h4>----------G----------</h4>
  <div>
    <h5 ref="h5InG">h5InG</h5>
    <button @click="console.log(h5InG)">输出</button>
  </div>
</template>

<script setup lang="ts" name="">
import { ref } from "vue"
let h5InG = ref()
// 通过defineExpose来暴露数据给父组件
let expose_data = '暴露的数据'
defineExpose({
  expose_data
})
</script>

<style scoped></style>